package com.quanyan.stadium.service.admin;

import com.quanyan.api.APIResponse;
import com.quanyan.common.Plugin.PageObj;
import com.quanyan.stadium.api.req.ReqAuthorizeClub;
import com.quanyan.stadium.api.req.ReqId;
import com.quanyan.stadium.api.req.ReqIdAndPage;
import com.quanyan.stadium.api.req.admin.*;
import com.quanyan.stadium.api.resp.admin.RespGameEventDetail;
import com.quanyan.stadium.api.resp.admin.RespOrderDetail;
import com.quanyan.stadium.api.resp.admin.RespOrderList;
import com.quanyan.stadium.entity.TbGameBanner;
import com.quanyan.stadium.entity.TbGameCommonParameter;
import com.quanyan.stadium.entity.TbGameEvent;
import com.quanyan.stadium.entity.TbGameOrder;
import com.quanyan.stadium.entity.vo.GameEvent;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

/**
 * @author dongshenglin
 * @date 2016/6/23  10:54
 */
public interface AdminGameEventService {

    /**
     * 更新赛事你状态
     *
     * @param reqGameEventStatusUpdate
     *
     * @return
     * */
    boolean updateGameEventStatus(ReqGameEventStatusUpdate reqGameEventStatusUpdate);

    /**
     * 赛事信息搜索
     *
     * @param reqSearchGameEvent
     *
     * @return APIResponse 赛事基本信息
     * */
    RespGameEventDetail queryTbGameEventList(ReqSearchGameEvent reqSearchGameEvent);

    /**
     * 获取父赛事信息
     *
     * @param reqOfficialGameEvent
     *
     * @return APIResponse 赛事基本信息
     * */
    List<TbGameEvent> queryOfficialGameEventByPlaceIdAndCategoryId(ReqOfficialGameEvent reqOfficialGameEvent);

    /**
     * 官方创建赛事
     *
     * @param createGameEvent 赛事创建所需对象
     *
     * @return APIResponse 赛事基本信息
     * */
    APIResponse<GameEvent> createGameEvent(ReqCreateGameEventExtraMsg createGameEvent) throws InvocationTargetException, IllegalAccessException;


    /**
     * 授权俱乐部
     *
     *
     * @return APIResponse
     * */
    APIResponse authorizeClub(ReqAuthorizeClub reqAuthorizeClub);

    /**
     * 取消俱乐部授权
     *
     *
     * @return APIResponse
     * */
    APIResponse closeClubAuthorize(Integer clubAuthorizeId);

    /**
     * 查询订单列表
     * @param request
     * @return
     */
    APIResponse<PageObj<List<RespOrderList>>> queryOrderList(ReqOrderList request);

    /**
     * 查询订单列表
     * @param request
     * @return
     */
    APIResponse<RespOrderDetail> queryOrderDetail(TbGameOrder request);

    /**
     * 查询赛事详情
     * @return
     */
    APIResponse<TbGameEvent> queryGameEvent(TbGameEvent tbGameEvent);

    /**
     * 俱乐部授权列表
     * @return
     */
    APIResponse authorizeClubPlaceList(ReqIdAndPage reqIdAndPage);

    /**
     * 根据城市id查询banner图
     */
    APIResponse<List<TbGameBanner>> getBannerList(ReqId reqId);

    /**
     * 增加banner图
     */
    APIResponse addBannerList(ReqBannerList bannerList);

    /**
     * 查询某个城市下banner图个数
     */
    APIResponse<Integer> getBannerCount(Integer cityId);

    /**
     * 编辑banner图
     */
    APIResponse editBanner(ReqBanner banner);

    /**
     * 设置优先级
     */
    APIResponse setBannerPriority(ReqBannerPriorityList priorityList);

    /**
     * 删除banner图
     */
    APIResponse deleteBanner(Integer id);

    /**
     * 退款
     * @param request
     * @return
     */
    APIResponse refound(ReqFoundOrder request);

    /**
     *  获取配置项列表
     */
    PageObj<List<TbGameCommonParameter>> getCommonParameterList(ReqParamer reqParamer);

    /**
     * 添加配置项
     */
    APIResponse addCommonParameter(TbGameCommonParameter commonParameter);

    /**
     * 编辑配置项
     */
    APIResponse editCommonParameter(TbGameCommonParameter commonParameter);

    /**
     * 启用/不启用配置项
     */
    APIResponse changeCommonParameter(Integer id,Byte status);

    /**
     * 授权俱乐部列表
     *
     *
     * @return APIResponse
     * */
    APIResponse authorizeClubList();


}
